package com.yantu.controller.leader;

import com.yantu.bean.User;
import com.yantu.bean.UserEventLog;
import com.yantu.mapper.UserEventLogMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class leaderUserLogController {

    @Autowired
    UserEventLogMapper userEventLogMapper;

    //小队长端添加日志
    public void leaderAddLog(User user, String msg){
        UserEventLog userLog = new UserEventLog();
        userLog.setCreateTime(new Date());
        userLog.setUserName(user.getUserName());
        userLog.setRealName(user.getRealName());
        userLog.setUserId(user.getId());
        userLog.setContent(msg);
        userEventLogMapper.insert(userLog);
    }
}
